package com.wayhome.openfeign.controller;


import com.wayhome.openfeign.service.feign.StockFeignService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api")
@RequiredArgsConstructor
public class ApiController {

    private final StockFeignService service;

    @GetMapping("/feign")
    public String helloFeign() {
        return "hello feign 。。。";
    }

    @GetMapping("/stock")
    public String stock() {
        return service.reduction();
    }

}
